﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OurArithHelpers;
using DTOs;
namespace WindowsFormsApplication
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void btnAddNo_Click(object sender, EventArgs e)
        {
            StudentInfo stud = new StudentInfo();
            //stud.Roll=101;
            //kjhhhgyuygyftyfytyt
            // int r = stud.Roll;   

            stud.RollNo = 101;
            int r = stud.RollNo;

            int n1 = Int32.Parse(txtNo1.Text);
            int n2 = Int32.Parse(txtNo2.Text);

            int t = ArithManager.AddNos(n1, n2);
            //double avg=BasicArith.Avg(n1, n2, 10); 
            lblResult.Text = "Sum = " + t;
        }

        private void btnAvg_Click(object sender, EventArgs e)
        {
            int n1 = Int32.Parse(txtNo1.Text);
            int n2 = Int32.Parse(txtNo2.Text);
            double avg=BasicArith.Avg(n1, n2, 10);

            lblResult.Text = "Average is " + avg;
        }
    }
}
